<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//用户更新
Route::prefix('v3/mini_user')->group(function(){
    Route::post('update','Api\UserController@update');
    Route::post('update_date','Api\UserController@updateDate');
    Route::post('order','Api\UserController@order');
    Route::post('order_detail','Api\UserController@orderDetail');
    Route::post('order_detail_sign','Api\UserController@orderDetailSign');
    Route::post('pay','Api\UserController@pay');
    Route::post('idle_car','Api\UserController@idleCar');
    Route::post('sendtemptest','Api\UserController@sendtemptest');
});

//顾客足迹
Route::prefix('customer_foot')->group(function(){
    Route::post('store','Api\CustomFootController@store');
    Route::post('update','Api\CustomFootController@update');
});
Route::prefix('v3/mini_order')->group(function(){
    //立即出车订单
    Route::post('convert', 'Api\UserOrderController@convert');
//    小程序订单
    Route::post('place', 'Api\PlaceController@createMini');
    //续租
    Route::post('extend_lease', 'Api\PlaceController@extendLease');
    //确认接单
    Route::post('temple_change', 'Api\PlaceController@templeChange');
    //确认更换车系
    Route::post('confirm_change_series', 'Api\UserOrderController@cnofirmChangeSeries');
});
Route::prefix('v3/order')->group(function(){
    //保养小于1000公里数
    Route::post('wait_maintenance', 'Api\UserOrderController@waitMaintenance');
    //火花塞小于500公里数
    Route::post('wait_tearbox', 'Api\UserOrderController@waitearbox');
});

//新建订单3.0
Route::prefix('v3/order')->middleware('auth:sanctum')->group(function(){
    //获取订单数量
    Route::post('get_order_num', 'Api\UserOrderController@getOrderNum');
    //用户搜索
    Route::post('search_customer', 'Api\UserOrderController@searchCustomer');
    //判断用户是否是客户
    Route::post('get_customer', 'Api\UserOrderController@getCustomer');
//    搜索小程序用户
    Route::post('search_user', 'Api\UserOrderController@searchUser');
    //获取车系不可租日期
    Route::post('get_non_lease_date', 'Api\UserOrderController@getNoLeaseDate');
    //获取维修中车辆
    Route::post('get_service_car', 'Api\UserOrderController@getServiceCar');
    //获取保养中的车辆
    Route::post('get_maintenance_car', 'Api\UserOrderController@getMaintenance');

    //获取空闲车辆
    Route::post('get_empty_car', 'Api\UserOrderController@getEmptyCar');
    //历史订单
    Route::post('get_user_order_list', 'Api\UserOrderController@getUserOrder');
    //根据客户id查询订单
    Route::post('user_order_list', 'Api\UserOrderController@getCustomerOrder');
    //车辆搜索
    Route::post('search_cars', 'Api\UserOrderController@searchCar');
    Route::post('search_single_car', 'Api\UserOrderController@searchSingleCar');
    Route::post('search_single_car_count', 'Api\UserOrderController@searchSingleCarCount');
    //实时换算价格
    Route::post('convert', 'Api\UserOrderController@convert');
    //获取送车人员
    Route::post('employer', 'Api\UserOrderController@employer');
    //取消订单
    Route::post('order_cancel', 'Api\UserOrderController@cancel');
    //改排订单
    Route::post('change_car', 'Api\UserOrderController@changeCar');

    //改排店源
    Route::post('change_source', 'Api\UserOrderController@changeSource');
    //获取历史车辆信息
    Route::post('history_order', 'Api\UserOrderController@historyOrder');
    //关联客户
    Route::post('trans_customer', 'Api\UserOrderController@transCustomer');


    //立即出车订单
    Route::post('place', 'Api\PlaceController@create');
    //预订单
    Route::post('preparatory', 'Api\PlaceController@preparatory');
    /*
     * 待支付订单
     */
    Route::post('pending/list', 'Api\PendingPaymentController@list');
    Route::post('pending/edit', 'Api\PendingPaymentController@edit');
    Route::post('pending/update', 'Api\PendingPaymentController@update');
    //设置送车人员
    Route::post('store_confirm_order/set_send_member', 'Api\ShopManagerController@setSendCarMember');
    //确认改价订单
    Route::post('store_confirm_order/confirm_change_price', 'Api\ShopManagerController@confirmChangePrice');
    //店长确认订单
    Route::post('store_confirm_order/confirm_order', 'Api\ShopManagerController@ConfirmOrder');
    //待出车订单
    Route::post('store_confirm_order/perparctor_order', 'Api\ShopManagerController@PerparatoryInfo');
    //待收车订单
    Route::post('store_confirm_order/wait_close_car', 'Api\ShopManagerController@WaitCloseCarInfo');
    //待收车订单数量
    Route::post('store_confirm_order/wait_close_car_total', 'Api\ShopManagerController@WaitCloseCarInfoTotal');
    //店长排车
    Route::post('store_confirm_order/list', 'Api\StoreManagerConfirmController@list');
    Route::post('store_confirm_order/update', 'Api\StoreManagerConfirmController@update');
    //待租车辆
    Route::post('store_confirm_order/unused', 'Api\StoreManagerConfirmController@UnusedCar');

    /**
     * 接单
     */
    Route::post('picking/panel', 'Api\PickOrderController@panel');
    Route::post('picking/list', 'Api\PickOrderController@list');
    Route::post('picking/edit', 'Api\PickOrderController@edit');
    Route::post('picking/choose_car', 'Api\PickOrderController@chooseCar');
    Route::post('picking/confirm', 'Api\PickOrderController@confirmOrder');
    Route::post('picking/update', 'Api\PickOrderController@update');
    Route::post('picking/finish', 'Api\PickOrderController@finish');
    //改价确认状态
    Route::post('change_price/status', 'Api\PickStatisticsController@changePriceConfirm');
    //未结清订单
    Route::post('picking/is_not_settle', 'Api\PickStatisticsController@isNotSettle');


    /**
     * 还车
     */
    Route::post('using/list', 'Api\UsingController@list');
    Route::post('using/edit', 'Api\UsingController@edit');
    Route::post('using/update', 'Api\UsingController@update');
    /**
     * 店长还车或确认还车
     */
    Route::post('shop_manager/list', 'Api\ShopManagerController@list');
    //小程序预订单
    Route::post('shop_manager/order_form', 'Api\ShopManagerController@OrderForm');
    //还车
    Route::post('shop_manager/return', 'Api\ShopManagerController@return');
    //选车位置
    Route::post('shop_manager/choose_position', 'Api\ShopManagerController@choosePosition');
//    待还车订单进行后台还车
    Route::post('shop_manager/confirm_return', 'Api\ShopManagerController@confirmReturn');
    //按日期获取订单
    Route::post('shop_manager/lease_day', 'Api\ShopManagerController@leaseDay');
    /**
     * 设置订单提醒
     */
    Route::post('shop_manager/reminder', 'Api\ShopManagerController@reminder');
    Route::post('shop_manager/reminder_list', 'Api\ShopManagerController@reminderList');

    /**
     * 统计中
     */
    Route::post('pickstatis/list', 'Api\PickStatisticsController@list');
    Route::post('pickstatis/edit', 'Api\PickStatisticsController@edit');
//    统计更新
    Route::post('pickstatis/update', 'Api\PickStatisticsController@update');
    Route::post('pickstatis/finish', 'Api\PickStatisticsController@finish');
    Route::post('pickstatis/freed', 'Api\PickStatisticsController@freed');
    //选择清理人
    Route::post('pickstatis/choose_cleaner', 'Api\PickStatisticsController@chooseCleaner');
    /**
     * 已统计
     */
    Route::post('pickfinish/list', 'Api\PickFinishController@list');
    Route::post('pickfinish/edit', 'Api\PickFinishController@edit');
    Route::post('pickfinish/update', 'Api\PickFinishController@update');
    Route::post('pickfinish/refund_order', 'Api\PickFinishController@refundOrder');

    //订单
    Route::post('update','Api\OrderController@update');
    //更新任意字段
    Route::post('update_all','Api\OrderController@updateAll');
    Route::post('order_month_dz','Api\OrderController@orderMonthDz');
    Route::post('order_month_sett','Api\OrderController@orderMonthSett');
    // 创建入账单
    Route::post('order_entry','Api\OrderController@orderEntry');
    Route::post('all','Api\OrderController@all');
    Route::post('detail','Api\OrderController@orderDetail');
    //更换车系
    Route::post('change_car_series','Api\OrderController@changeCarSeries');
    //是否送车和还车状态更新
    Route::post('update_process_status','Api\OrderController@updateProcessStatus');
    //获取待排车数据
    Route::post('get_process_row','Api\OrderController@getProcessRow');
    //获取待排车数据
    Route::post('get_process_sign','Api\OrderController@getProcessSign');
    //获取用车中数据
    Route::post('get_process_usedcar','Api\OrderController@getProcessUsedcar');
    //获取待取回数据
    Route::post('get_process_returncar','Api\OrderController@getProcessReturncar');
    //获取取回中数据
    Route::post('get_process_returningcar','Api\OrderController@getProcessReturningcar');
    //获取送车和还车列表
    Route::post('get_process_status','Api\OrderController@getProcessStatus');
    //获取送取车清洗列表
    Route::post('get_sqc','Api\OrderController@getSqcStatus');
    //更新未结清状态
    Route::post('uncleared_status','Api\OrderController@unclearedStatus');

//租金统计
    Route::post('dashboard','Api\OrderController@dashboard');
    //小程序首页
    Route::post('home','Api\HomeController@index');
    //小程序客户页
    Route::post('home_kh','Api\HomeController@indexkh');
    Route::post('home_kh_month','Api\HomeController@cuctomerByMonth');
    //小程序车辆页
    Route::post('home_cl','Api\HomeController@indexcl');
    //小程序维保页
    Route::post('home_wb','Api\HomeController@indexwb');
    //小程序财务页
    Route::post('home_cw','Api\HomeController@indexcw');
    //获取不同类型车辆数量
    Route::post('get_car_category','Api\HomeController@getCarCategoryNum');
    Route::post('get_car_series_category','Api\HomeController@getCarSeriesCategoryNum');
    //车辆租统计
    Route::post('statistics_num','Api\HomeController@statisticsNum');

    //罚款处理
    Route::post('illegals/list', 'Api\IllegalsController@list');
    Route::post('illegals/edit', 'Api\IllegalsController@edit');
    Route::post('illegals/store', 'Api\IllegalsController@store');
    Route::post('illegals/update', 'Api\IllegalsController@update');
    Route::post('illegals/delete', 'Api\IllegalsController@destroy');
    Route::post('illegals/getlog', 'Api\IllegalsController@getLog');

    //已收车
    Route::post('collect_car/list', 'Api\CollectCarController@list');

    //违章未处理
    Route::post('illegals/undeal', 'Api\IllegalsController@getUndealIllegal');
    //出勤统计
    Route::post('attendance/list', 'Api\AttendanceStatisticsController@list');
    Route::post('attendance/store', 'Api\AttendanceStatisticsController@store');
    Route::post('attendance/update', 'Api\AttendanceStatisticsController@update');
    Route::post('attendance/edit', 'Api\AttendanceStatisticsController@edit');
    Route::post('attendance/destory', 'Api\AttendanceStatisticsController@destory');
    Route::post('attendance/user_data', 'Api\AttendanceStatisticsController@userData');
    Route::post('attendance/update_by_ordersn', 'Api\AttendanceStatisticsController@updateByOrderSn');
    Route::post('attendance/update_by_ordersn_qh', 'Api\AttendanceStatisticsController@updateByOrderSnQh');


});

